From: Robert Mader Date: Fri, 3 Nov 2023 15:20:24 +0000 (+0100) Subject: shell/screenshot: Use MtkRegion X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~327 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c032bb62a5760ce90283fde9493d00cbfe53a323;p=gnome-shell.git shell/screenshot: Use MtkRegion Remove the last user of cairo_region_t in favor of MtkRegion, fixing a build warning. --- diff --git a/src/shell-screenshot.c b/src/shell-screenshot.c index 2c384fcf6..5c4885d39 100644 --- a/src/shell-screenshot.c +++ b/src/shell-screenshot.c @@ -376,7 +376,7 @@ draw_cursor_image (cairo_surface_t *surface, MetaDisplay *display; MetaCursorTracker *tracker; cairo_surface_t *cursor_surface; - cairo_region_t *screenshot_region; + g_autoptr (MtkRegion) screenshot_region = NULL; cairo_t *cr; int x, y; int xhot, yhot; @@ -390,16 +390,13 @@ draw_cursor_image (cairo_surface_t *surface, if (!texture) return; - screenshot_region = cairo_region_create_rectangle (&area); + screenshot_region = mtk_region_create_rectangle (&area); meta_cursor_tracker_get_pointer (tracker, &point, NULL); x = point.x; y = point.y; - if (!cairo_region_contains_point (screenshot_region, point.x, point.y)) - { - cairo_region_destroy (screenshot_region); - return; - } + if (!mtk_region_contains_point (screenshot_region, point.x, point.y)) + return; meta_cursor_tracker_get_hot (tracker, &xhot, &yhot); width = cogl_texture_get_width (texture); @@ -439,7 +436,6 @@ draw_cursor_image (cairo_surface_t *surface, cairo_destroy (cr); cairo_surface_destroy (cursor_surface); - cairo_region_destroy (screenshot_region); g_free (data); }